Skip to main content

Last

Last[expr] gives the last element in expr. 

Last[expr,def] gives the last element if there are any elements, or def otherwise.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.